package cn.sun.feign;

import cn.sun.domain.Product;
import cn.sun.feign.fallback.ProductFeignFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(name = "product-service", fallback = ProductFeignFallBack.class)
public interface IProductFeignService {
    @GetMapping("/product/{pid}")
    Product findById(@PathVariable("pid") Long pid);
}
